//
//  SKZhuXianViewController.swift
//  玩玩,传递
//
//  Created by yanli on 16/7/14.
//  Copyright © 2016年 mountainPassCell. All rights reserved.
//

import UIKit



let ScreenWidth = UIScreen.mainScreen().bounds.width
let ScreenHeight = UIScreen.mainScreen().bounds.height

class SKZhuXianViewController: UIViewController {
    
    //我的 ScrollView
//    @IBOutlet weak var myScrollView: UIScrollView!
    
    
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
//        view = myScrollView
        
        self.automaticallyAdjustsScrollViewInsets = false
        
        
        
        enterWorld()
        
        
        // 对 ScrollView 相关操作
//        setScrollView()
        
    }

    
    // 对 ScrollView 相关操作
    private func setScrollView () {
//        // 分页效果
//        myScrollView.pagingEnabled = true
//        // 关闭滚动条
//        myScrollView.showsHorizontalScrollIndicator = false
//        myScrollView.showsVerticalScrollIndicator = false
//        // 关闭弹簧效果
//        myScrollView.bounces = false
//        // 设置滚动范围
//        myScrollView.contentSize = CGSize(width: ScreenWidth * 3, height: ScreenHeight)
//        myScrollView.backgroundColor = UIColor.redColor()
    }
    
    
    
    private func enterWorld() {
        
        
        //创建无限轮播图
        let scrollView =  YLInfiniteScrollView()
        
        //设置无限轮播图
        let scrollViewH = CGFloat(200)
        let scrollViewW = UIScreen.mainScreen().bounds.size.width
        scrollView.frame = CGRectMake(0, 0, scrollViewW, scrollViewH)
        scrollView.images = [ UIImage(named:"fan")!,
                              UIImage(named:"shen")!,
                              UIImage(named:"dou")!,
        ]
        
        
        
        //设置轮播的View为 tableHeaderView
        view = scrollView
    }
    
    
    
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    



}
